#!/sbin/openrc-run

name="Icecast 2"
command="/usr/bin/icecast"
command_background=yes
: ${cfgfile:=/etc/icecast.xml}
: ${command_user:=icecast}
: ${command_group:=icecast}
command_args="-c $cfgfile ${ICEC_OPTS}"
pidfile="/run/icecast/icecast.pid"

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath --directory --owner $command_user:$command_group ${pidfile%/*} /var/log/icecast
}
